<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>教案管理</title>
    <!-- 引入 Font Awesome 字体图标库（在线 CDN 方式，解决图标显示问题） -->
    <link rel="stylesheet" href="../../static/css/all.min.css">
    <style>
        :root {
            --primary-color: #4361ee;
            --secondary-color: #3f37c9;
            --accent-color: #4895ef;
            --light-color: #f8f9fa;
            --dark-color: #212529;
            --success-color: #4cc9f0;
            --warning-color: #f8961e;
            --danger-color: #f72585;
            --border-radius: 8px;
            --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            --border-color: #e0e0e0;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: #f5f7fa;
            color: var(--dark-color);
            line-height: 1.6;
            padding: 20px;
        }

        .plan-management-container {
            max-width: 1400px;
            margin: 0 auto;
            background: white;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            overflow: hidden;
        }

        /* 搜索及生成栏样式 */
        .search-container {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            padding: 20px;
            background: white;
            border-bottom: 1px solid var(--border-color);
            align-items: center;
        }

        .generate-btn {
            padding: 10px 20px;
            background-color: var(--primary-color);
            color: white;
            border: none;
            border-radius: var(--border-radius);
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .generate-btn:hover {
            background-color: var(--secondary-color);
        }

        .search-box {
            flex: 1;
            min-width: 200px;
            position: relative;
        }

        .search-box input {
            width: 100%;
            padding: 10px 15px 10px 40px;
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius);
            font-size: 14px;
            transition: all 0.3s;
        }

        .search-box input:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
            outline: none;
        }

        .search-box i {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: #adb5bd;
        }

        .search-btn {
            padding: 10px 20px;
            background-color: var(--success-color);
            color: white;
            border: none;
            border-radius: var(--border-radius);
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .search-btn:hover {
            background-color: #3ab7d8;
        }

        /* 表格样式 */
        .plan-table {
            width: 100%;
            overflow-x: auto;
        }

        table {
            width: 100%;
            border-collapse: collapse;
        }

        thead {
            background-color: var(--primary-color);
            color: white;
        }

        th {
            padding: 15px;
            font-weight: 500;
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            text-align: center;
        }

        tbody tr {
            border-bottom: 1px solid var(--border-color);
            transition: all 0.2s ease;
        }

        tbody tr:hover {
            background-color: rgba(67, 97, 238, 0.05);
        }

        td {
            padding: 15px;
            color: #495057;
            font-size: 14px;
            vertical-align: middle;
        }

        /* 操作按钮样式 */
        .action-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 6px 12px;
            margin-right: 5px;
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius);
            background: none;
            cursor: pointer;
            color: #adb5bd;
            transition: all 0.2s ease;
        }

        .action-btn:hover {
            background-color: #f0f0f0;
            color: var(--primary-color);
        }

        /* 分页器样式 */
        .pagination-container {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            padding: 20px;
            background: white;
            border-top: 1px solid var(--border-color);
            gap: 10px;
        }

        .pagination-controls {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .page-btn {
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            background: none;
            cursor: pointer;
            transition: all 0.2s;
        }

        .page-btn:hover {
            border-color: var(--primary-color);
            color: var(--primary-color);
        }

        .page-btn.active {
            background-color: var(--primary-color);
            border-color: var(--primary-color);
            color: white;
        }

        .page-btn.disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .page-input {
            width: 60px;
            height: 36px;
            text-align: center;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            margin: 0 10px;
        }

        .page-size-selector {
            margin-left: 10px;
        }

        .page-size-select {
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 3px;
            background: #fff;
            cursor: pointer;
            outline: none;
            transition: border-color 0.2s;
        }

        .page-size-select:hover {
            border-color: #999;
        }

        .page-size-select:focus {
            border-color: #1890ff;
            box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
        }

        .page-size-select {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 8px center;
            background-size: 16px;
            padding-right: 28px;
        }

        .change {
            width: 50px;
        }

        .page-input {
            outline: none;
        }

        .page-input:focus {
            border-color: #1890ff;
            box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
        }

        /* 生成教案弹层样式 */
        .generate-dialog {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }

        .generate-dialog-content {
            background-color: white;
            padding: 25px;
            border-radius: 8px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
            width: 400px;
            position: relative;
            animation: fadeIn 0.3s;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .generate-close-btn {
            position: absolute;
            top: 15px;
            right: 20px;
            font-size: 24px;
            color: #999;
            cursor: pointer;
            transition: color 0.2s;
        }

        .generate-close-btn:hover {
            color: #666;
        }

        .generate-dialog h3 {
            margin-bottom: 20px;
            font-size: 18px;
            color: #2c3e50;
        }

        .generate-dialog .form-group {
            margin-bottom: 15px;
        }

        .generate-dialog .form-group label {
            display: block;
            margin-bottom: 5px;
            font-weight: 500;
        }

        .generate-dialog .form-group input {
            width: 100%;
            padding: 8px;
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius);
            font-size: 14px;
        }

        .generate-dialog .btn-group {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        .generate-dialog .btn {
            padding: 8px 20px;
            border: none;
            border-radius: var(--border-radius);
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s;
        }

        .generate-dialog .btn-confirm {
            background-color: #3498db;
            color: white;
        }

        .generate-dialog .btn-confirm:hover {
            background-color: #2980b9;
        }

        .generate-dialog .btn-cancel {
            background-color: #ecf0f1;
            color: #7f8c8d;
        }

        .generate-dialog .btn-cancel:hover {
            background-color: #d5dbdb;
        }

        /* 预览弹层样式 */
        .preview-dialog {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }

        .preview-dialog-content {
            background-color: white;
            padding: 25px;
            border-radius: 8px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
            width: 400px;
            position: relative;
            animation: fadeIn 0.3s;
        }

        .preview-close-btn {
            position: absolute;
            top: 15px;
            right: 20px;
            font-size: 24px;
            color: #999;
            cursor: pointer;
            transition: color 0.2s;
        }

        .preview-close-btn:hover {
            color: #666;
        }

        .preview-dialog h3 {
            margin-bottom: 20px;
            font-size: 18px;
            color: #2c3e50;
        }

        .preview-dialog .form-group {
            margin-bottom: 15px;
        }

        .preview-dialog .form-group label {
            display: block;
            margin-bottom: 5px;
            font-weight: 500;
        }

        .preview-dialog .form-group input {
            width: 100%;
            padding: 8px;
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius);
            font-size: 14px;
            background-color: #f5f7fa;
        }

        .preview-dialog .btn-group {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        .preview-dialog .btn {
            padding: 8px 20px;
            border: none;
            border-radius: var(--border-radius);
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s;
        }

        .preview-dialog .btn-cancel {
            background-color: #ecf0f1;
            color: #7f8c8d;
        }

        .preview-dialog .btn-cancel:hover {
            background-color: #d5dbdb;
        }
        /* 基础按钮样式（适用于 button 和 a 标签） */
        .action-btn {
            padding: 6px 12px;
            margin: 0 3px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            text-decoration: none; /* 去掉 a 标签的下划线 */
        }

        /* 下载按钮样式 */
        .download-btn {
            background-color: #4CAF50;
            color: white;
        }

        .download-btn:hover {
            background-color: #45a049;
        }

        /* 预览按钮样式 */
        .preview-btn {
            background-color: #2196F3;
            color: white;
        }

        .preview-btn:hover {
            background-color: #0b7dda;
        }
        td{
            text-align: center;
        }
        tr{
            text-align: center;
        }
        /* 删除按钮样式 */
        .delete-btn {
            background-color: #f44336;
            color: white;
        }

        .delete-btn:hover {
            background-color: #da190b;
        }

        /* 图标样式 */
        .action-btn i {
            margin-right: 5px;
            font-size: 12px;
        }
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        .confirmModal{
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }
        .confirmModal1{
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }
        /* 正确提示框样式 */
        .alert-success {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            padding: 15px 20px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            background-color: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            z-index: 1000;
            max-width: 80%;
            animation: slideIn 0.3s ease-out forwards;
        }
        .alert-danger {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            padding: 15px 20px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            border: 1px solid #c3e6cb;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            z-index: 1000;
            max-width: 80%;
            animation: slideIn 0.3s ease-out forwards;
        }
        .alert-success i {
            margin-right: 10px;
            font-size: 18px;
        }

        .alert-close {
            margin-left: 15px;
            background: none;
            border: none;
            color: inherit;
            font-size: 20px;
            cursor: pointer;
            padding: 0 0 0 10px;
            line-height: 1;
        }

        /* 动画效果 */
        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translate(-50%, -30px);
            }
            to {
                opacity: 1;
                transform: translate(-50%, 0);
            }
        }

        @keyframes slideOut {
            from {
                opacity: 1;
                transform: translate(-50%, 0);
            }
            to {
                opacity: 0;
                transform: translate(-50%, -30px);
            }
        }
        .analysis-content {
            min-height: 120px;
            padding: 16px;
            background-color: #f8f9fa;
            border-radius: 8px;
            border-left: 4px solid #4361ee;
            margin: 16px 0;
            font-size: 14px;
            line-height: 1.6;
            color: #495057;
        }
    /*    预览弹框*/
        .analysis-content {
            max-height: 400px;
            overflow-y: auto;
            margin-bottom: 20px;
            padding: 20px;
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius);
        }
        .elegant-report {
            font-family: "Helvetica Neue", sans-serif;
            line-height: 1.8;
        }
        .elegant-report strong {
            color: #2c3e50;
            font-weight: 600;
            background: linear-gradient(transparent 60%, #F0F7FF 40%);
        }
        .modal-content {
            background-color: white;
            padding: 32px;
            border-radius: 12px;
            width: 100%;
            max-width: 520px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
            position: relative;
            animation: modalFadeIn 0.3s ease-out;
            border: 1px solid rgba(0,0,0,0.05);
        }
        .modal-content {
            background-color: white;
            padding: 25px;
            border-radius: 8px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
            width: 500px;
            position: relative;
            animation: fadeIn 0.3s;
        }
        .close-btn {
            position: absolute;
            top: 20px;
            right: 20px;
            font-size: 24px;
            cursor: pointer;
            color: #adb5bd;
            transition: all 0.2s ease;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;

        }
        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: var(--border-radius);
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .close-btn:hover {
            color: #e74c3c;
            background-color: #f8f9fa;
        }
        .btn-primary {
            background-color: var(--primary-color);
            color: white;
        }

        .btn-primary:hover {
            background-color: var(--secondary-color);
        }
        .btn-cancel {
            padding: 8px 20px;
            background-color: #ecf0f1;
            color: #7f8c8d;
            border: none;
            border-radius: var(--border-radius);
            cursor: pointer;
        }

        .btn-cancel:hover {
            background-color: #d5dbdb;
        }
        .generateExam-btn {
            background-color: #4CAF50; /* 绿色背景 */
            color: white;
            border: none;
            padding: 6px 12px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            transition: background-color 0.3s;
            margin: 0 3px;
        }

        .generateExam-btn:hover {
            background-color: #3e8e41; /* 深绿色悬停效果 */
        }
        /* 弹层基础样式 */
        .generate-dialog-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.5);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            transition: all 0.3s ease;
        }

        .generate-dialog-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .generate-dialog-container {
            width: 600px;
            max-width: 90%;
            background: white;
            border-radius: 10px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            overflow: hidden;
            transform: translateY(-20px);
            transition: transform 0.3s ease;
        }

        .generate-dialog-overlay.active .generate-dialog-container {
            transform: translateY(0);
        }

        /* 弹层头部 */
        .generate-dialog-header {
            padding: 20px;
            background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
            color: white;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .generate-dialog-header h3 {
            margin: 0;
            font-size: 18px;
            font-weight: 600;
            display: flex;
            align-items: center;
        }

        .generate-dialog-header h3 i {
            margin-right: 10px;
        }

        .generate-close-btn {
            background: none;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
            padding: 0;
            line-height: 1;
        }

        /* 弹层内容 */
        .generate-dialog-body {
            padding: 20px;
            max-height: 70vh;
            overflow-y: auto;
        }

        .form-section {
            margin-bottom: 25px;
        }

        .form-section h4 {
            margin: 0 0 15px 0;
            color: #444;
            font-size: 16px;
            display: flex;
            align-items: center;
        }

        .form-section h4 i {
            margin-right: 8px;
            color: #6a11cb;
        }

        .form-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
        }

        .form-group {
            margin-bottom: 15px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: #555;
        }

        .form-control {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 14px;
            transition: border-color 0.3s;
        }

        .form-control:focus {
            border-color: #6a11cb;
            outline: none;
            box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
        }

        textarea.form-control {
            min-height: 80px;
            resize: vertical;
        }

        .required {
            color: #f44336;
        }

        /* 弹层底部按钮 */
        .generate-dialog-footer {
            padding: 15px 20px;
            background: #f9f9f9;
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        .btn {
            padding: 10px 20px;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .btn i {
            margin-right: 8px;
        }
        .btn-secondary {
            background: #f0f0f0;
            color: #555;
            border: 1px solid #ddd;
        }

        .btn-secondary:hover {
            background: #e0e0e0;
        }
        .btn-primary {
            background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
            color: white;
            border: none;
        }
        .btn-primary:hover {
            opacity: 0.9;
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }
    </style>
</head>

<body>
<div class="alert alert-danger" style="display: none;">
    <i class="fas fa-exclamation-circle"></i>
    <span id="error-message" class="errorMessage">生成教案失败</span>
</div>
<!-- 正确提示框 -->
<div class="alert alert-success" id="success-alert" style="display: none;">
    <i class="fas fa-check-circle"></i>
    <span id="success-message">生成教案成功</span>
    <button class="alert-close">&times;</button>
</div>
<div class="plan-management-container">
    <!-- 搜索及生成栏 -->
    <div class="search-container">
        <button class="generate-btn" id="generateBtn">
            <i class="fas fa-plus"></i>
            生成教案
        </button>
        <div class="search-box">
            <i class="fas fa-search"></i>
            <input type="text" placeholder="请输入教案名称..." class="search-lesson-plan">
        </div>
        <button class="search-btn" id="searchBtn">
            <i class="fas fa-search"></i>
            搜索
        </button>
    </div>

    <!-- 教案表格 -->
    <div class="plan-table">
        <table>
            <thead>
            <tr>
                <th>ID</th>
                <th>教案名称</th>
                <th>创建时间</th>
                <th>创建人</th>
                <th>教案备注</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody class="tbody">
            <!-- 可后续通过 JS 动态填充，这里放静态示例数据 -->
            <tr>
                <td>1</td>
                <td>教案001</td>
                <td>2025-07-25 00:00:00</td>
                <td>张老师</td>
                <td>是</td>
                <td>
                    <button class="action-btn" title="下载">下载</button>
                    <button class="action-btn" title="预览">预览</button>
                    <button class="action-btn" title="删除">删除</button>
                </td>
            </tr>
            </tbody>
        </table>
    </div>

    <!-- 分页器 -->
    <div class="pagination-container">
        <div class="pagination-controls pagination-controls1">
            <button class="page-btn first">
                <i class="fas fa-angle-double-left"></i>
            </button>
            <button class="page-btn front">
                <i class="fas fa-angle-left"></i>
            </button>
            <div class="page-number" style="display: flex">
                <button class="page-btn active">1</button>
            </div>
            <button class="page-btn next">
                <i class="fas fa-angle-right"></i>
            </button>
            <button class="page-btn end">
                <i class="fas fa-angle-double-right"></i>
            </button>
        </div>
        <div class="page-size-selector">
            <select class="page-size-select">
                <option value=5>5条/页</option>
                <option value=10>10条/页</option>
                <option value=20>20条/页</option>
                <option value=50>50条/页</option>
                <option value=100>100条/页</option>
            </select>
        </div>
        <input type="number" class="page-input" placeholder="页码" min="1" step="1">
        <button class="page-btn change">跳转</button>
    </div>
</div>

<!-- 高级生成教案弹层 -->
<div class="generate-dialog-overlay" id="generateDialog">
    <div class="generate-dialog-container">
        <div class="generate-dialog-header">
            <h3><i class="fas fa-book-open"></i> 生成新教案</h3>
            <button class="generate-close-btn" aria-label="关闭">&times;</button>
        </div>

        <div class="generate-dialog-body">
            <div class="form-section">
                <h4><i class="fas fa-info-circle"></i> 基本信息</h4>
                <div class="form-grid">
                    <div class="form-group">
                        <label for="planName">教案名称 <span class="required">*</span></label>
                        <input type="text" id="planName" class="form-control" placeholder="例如：高中语文《荷塘月色》教案">
                    </div>

                    <div class="form-group">
                        <label for="subject">学科 <span class="required">*</span></label>
                        <input type="text" id="subject" class="form-control" placeholder="例如：语文">
                    </div>
                </div>
            </div>

            <div class="form-section">
                <h4><i class="fas fa-bullseye"></i> 教学目标</h4>
                <div class="form-group">
          <textarea id="teachingGoal" class="form-control" rows="3"
                    placeholder="请输入教学目标，每行一个目标&#10;例如：&#10;1. 理解文章主旨&#10;2. 掌握写作手法"></textarea>
                </div>
            </div>

            <div class="form-section">
                <h4><i class="fas fa-clock"></i> 课时安排</h4>
                <div class="form-grid">
                    <div class="form-group">
                        <label for="classHours">课时数</label>
                        <input type="number" id="classHours" class="form-control" min="1" max="10" value="2">
                    </div>

                    <div class="form-group">
                        <label for="difficulty">难度级别</label>
                        <select id="difficulty" class="form-control">
                            <option value="easy">基础</option>
                            <option value="medium" selected>中等</option>
                            <option value="hard">高级</option>
                        </select>
                    </div>
                </div>
            </div>

            <div class="form-section">
                <h4><i class="fas fa-sticky-note"></i> 备注</h4>
                <div class="form-group">
          <textarea id="remark" class="form-control" rows="2"
                    placeholder="可输入特殊要求或注意事项"></textarea>
                </div>
            </div>
        </div>

        <div class="generate-dialog-footer">
            <button class="btn btn-secondary" id="cancelGenerateBtn">
                <i class="fas fa-times"></i> 取消
            </button>
            <button class="btn btn-primary" id="confirmGenerateBtn">
                <i class="fas fa-magic"></i> 智能生成教案
            </button>
        </div>
    </div>
</div>

<div class="preview-dialog" id="previewDialog">
    <div class="preview-dialog-content">
        <span class="preview-close-btn">&times;</span>
        <h3>教案预览</h3>
        <div class="analysis-content elegant-report" id="analysisContent report-container">
            <!-- 分析结果将通过JS动态加载 -->
        </div>
        <div class="btn-group">
            <button class="btn btn-cancel" id="cancelPreviewBtn">关闭</button>
        </div>
    </div>
</div>
<div class="confirmModal" id="confirmModal">
    <div class="modal-content" style="width: 400px;">
        <span class="close-btn" id="closeConfirmModal">&times;</span>
        <h3 id="confirmTitle">是否要删除该教案？</h3>
        <div class="confirm-content" id="confirmContent" style="margin-bottom: 20px;">
            <!-- 提示内容将通过JS动态加载 -->
        </div>
        <div class="confirm-footer" style="display: flex; justify-content: flex-end; gap: 10px;">
            <button class="btn btn-primary" id="confirmYes">是</button>
            <button class="btn btn-cancel" id="confirmNo">否</button>
        </div>
    </div>
</div>
<div class="confirmModal1" id="confirmModal1">
    <div class="modal-content" style="width: 400px;">
        <span class="close-btn" id="closeConfirmModal1">&times;</span>
        <h3 id="confirmTitle1">该教案已经生成过试卷</h3>
        <div class="confirm-content" id="confirmContent1" style="margin-bottom: 20px;">
            <!-- 提示内容将通过JS动态加载 -->
        </div>
        <div class="confirm-footer" style="display: flex; justify-content: flex-end; gap: 10px;">
            <button class="btn btn-primary" id="confirmYes1">确定</button>
        </div>
    </div>
</div>

<div id="compact-loader" style="
  position: fixed;
  top:50%;
  left:50%;
  right: 20px;
  width: 240px;
  padding: 12px;
  background: rgba(0,0,0,0.85);
  border-radius: 8px;
  display: none;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.3s;
  translate: -120px 0px;
  color: white;
  font-family: sans-serif;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
">
    <div class="spinner" style="
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 12px;
  "></div>
    <span class="text">正在AI生成教案，请稍等</span>
</div>

<!-- 引入 jQuery 等必要 JS 文件，这里假设路径正确，实际按项目调整 -->
<script src="../../static/js/jquery.js"></script>
<script src="../../static/js/jquery.cookie.js"></script>
<script src="../../static/js/marked.min.js"></script>
<script src="../../static/js/lesson_plan_management.js"></script>
<script src="../../static/js/book.js"></script>
<script>

</script>
</body>

</html>